package lab02.test28;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Test28 {
    public static void main(String[] args) {
        while (true) {
            Scanner s = new Scanner(System.in);
            System.out.println("请输入一个圆的半径：");
            try {
                double radius = s.nextDouble();
                System.out.println("面积：" + 3.14 * radius * radius);
            } catch (InputMismatchException e) {
                System.out.println("异常：输入的值不是数值");
            }
        }

    }
}
